import { NEWS_SAVE } from '../constants'

const initState = {
  list: [],
}

export default function news(state = initState, action) {
  switch (action.type) {
    case NEWS_SAVE:
      return {
        ...state,
        list: action.news,
      }
    default:
      return state
  }
}
